/**
 * 首页接口
 */
import request from "../request.js";
import url from "../../url/url.js";

/**
 * 获取目录
 */
export default {
    cmsCategory() {
        return request({
            url: url.baseUrl + "/cmsCategory/list",
            method: "POST"
        });
    },
    cmsDictList(data) {
        return request({
            url: url.baseUrl + "/cmsDict/list",
            method: "POST",
            data
        });
    },
    videoEdit(data) {
        return request({
            url: url.baseUrl + "/video/edit",
            method: "POST",
            data
        });
    },
    videoInfo(id) {
        return request({
            url: url.baseUrl + "/video/" + id,
            method: "get",
        });
    },
    /**
     * 获取热搜字段 /search/list
     */
    searchList() {
        return request({
            url: url.baseUrl + "/search/list",
            method: "POST"
        });
    },
    /**
     * 添加热搜字段 /search/save
     */
    searchSave(data) {
        return request({
            url: url.baseUrl + "/search/save",
            method: "PUT",
            data
        });
    },
}